import 'package:flutter/material.dart';

class ContainerTextImage extends StatefulWidget {
  const ContainerTextImage({ super.key });

  @override
  State<ContainerTextImage> createState() => _ContainerTextImageState();
}

class _ContainerTextImageState extends State<ContainerTextImage> {
  @override
  Widget build(BuildContext context) {
    return Container(
      width: 300,
      height: 300,
      // color: Colors.amberAccent,
      margin: const EdgeInsets.all(20),
      padding:const EdgeInsets.all(20) ,
      alignment: Alignment.topRight,
      decoration:  BoxDecoration(
        color: const Color.fromARGB(255, 62, 62, 59),
        borderRadius: BorderRadius.circular(150),  // 设置圆角
        border: Border.all(color: Colors.blueAccent, width: 10)
         ),
      child: const Text('''
           《春宵》 苏轼
        春宵一刻值千金， 花有清香月有阴。
        歌管楼台声细细， 秋千院落夜沉沉.   
      
 ''',
    style:  TextStyle(color: Colors.redAccent),
 ),
    );
  }
}


class TextCom extends StatelessWidget {
const TextCom({ super.key });

  @override
  Widget build(BuildContext context){
    return   Container(
      width: 200,
      height: 30,
      color: Colors.blueAccent,
      child: const Text(
        "今天学的怎么样啊，是不是特别简单啊，因为flutter和我们原来的学习的语法相悖的，所以说原来的掌握的好，这个可能就掌握不太好",
        overflow: TextOverflow.ellipsis,
        maxLines: 1,
        style: TextStyle(color: Colors.white),
      ),
    );
  }
}
// 图片组件
class ImageCom extends StatefulWidget {
  const ImageCom({ super.key });

  @override
  State createState() => _ImageCom();
}

class _ImageCom extends State<ImageCom> {
  @override
  Widget build(BuildContext context) {
    return Container(
      child: Column(
        children: [
          Image.network("https://p9-flow-imagex-sign.byteimg.com/ocean-cloud-tos/image_skill/200c6f89-18dd-4add-82cc-c5965e746e86_1729679502244168613_origin~tplv-a9rns2rl98-web-thumb.jpeg?rk3s=b14c611d&x-expires=1761215502&x-signature=DiNqLL3i%2BDGMQ1VNDEp4eXTxYHI%3D",
            width: 180,
            height: 180,
            fit: BoxFit.cover,
          ),
          Image.asset("assets/qiche.png", width: 200, height: 200,
           fit: BoxFit.cover,
          )
        ],
      ),
      
    );
  }
}